/**
 * 排序方式
 */
import {ActivityClassify, ActivityStatus} from "../activity-filter/activity-filter.model";


export enum RosterSortBy {
    //默认排序
    priority = 0,
    //状态
    name = 1,
    //活动开始时间
    time = 2,
    //参与时间
    takeTime = 2
}

/**
 * 查询条件组合
 */
export class RosterFilterModel {
    classify: ActivityClassify;
    ids: Array<any>;
    sortBy: RosterSortBy;
    type: Array<number>;
    status: Array<ActivityStatus>;
    starttime: number;
    endtime: number;
    startTakeTime: number;
    endTakeTime: number;
    trackStatus: Array<number>;

    constructor(classify = null) {
        this.classify = classify ? classify : ActivityClassify.marketActivity;
        this.ids = [];
        this.sortBy = RosterSortBy.priority;
        this.type = [];
        this.status = [];
        this.starttime = null;
        this.endtime = null;
        this.startTakeTime=null;
        this.endTakeTime=null;
        this.trackStatus = [];
    }
}

export class SingleRosterFilterModel {
    classify: ActivityClassify.marketActivity;
    trackStatus: Array<number>;
    sortBy: RosterSortBy;
    startTakeTime: any;
    endTakeTime: any;

    constructor() {
        this.sortBy = RosterSortBy.priority;
        this.trackStatus = [];
        this.startTakeTime = '';
        this.endTakeTime = '';
    }
}
